package com.pojo.req.dictItem;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author Huawei
 * @date 2024-01-05 17:23
 */
@Data
public class DictItemSaveReq {

    private Long id;

    /**
     * 字典类型id
     */
    @NotNull(message =  "字典类型id不能为空")
    private Long dictTypeId;

    /**
     * 值
     */
    @NotBlank(message = "字典值不能为空")
    @Length(min = 1,max = 128, message = "字典值长度允许1-128位")
    private String dictItemValue;

    /**
     * 字典名称
     */
    @NotBlank(message = "字典名称不能为空")
    @Length(min = 1,max = 128, message = "字典名称长度允许1-32位")
    private String dictItemName;
    /**
     * 描述
     */
    @Length(max = 255, message = "类型描述长度最大允许255位")
    private String dictDesc;

    /**
     * 排序
     */
    @Max(value = 99999999, message = "排序不能超过8位")
    private Integer sort;
}
